package com.ht.medicaltreatment.bean;

import androidx.annotation.NonNull;

import com.hjq.http.annotation.HttpIgnore;
import com.hjq.http.config.IRequestApi;
import com.hjq.http.config.IRequestType;
import com.hjq.http.model.BodyType;

import java.util.List;

public class SubmitConsumableJSON implements IRequestApi, IRequestType {
    @HttpIgnore
    private boolean isUpdate;
    public void isUpdate(boolean isUpdate){
        this.isUpdate = isUpdate;
    }

    private List<ProjectConsumableListBean> projectConsumableList;
    private int projectId;//专题列表id

    public List<ProjectConsumableListBean> getProjectConsumableList() {
        return projectConsumableList;
    }

    public void setProjectConsumableList(List<ProjectConsumableListBean> projectConsumableList) {
        this.projectConsumableList = projectConsumableList;
    }

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    @NonNull
    @Override
    public String getApi() {
        if(isUpdate){
            return "/other/app_projectConsumable/updateProjectConsumable.do";
        }else {
            return "/other/app_projectConsumable/saveProjectConsumable.do";
        }
    }

    @NonNull
    @Override
    public BodyType getBodyType() {
        return BodyType.JSON;
    }


    public static class ProjectConsumableListBean {
        private int consumableId;//最后一个选择项的id，可以是规格id，也可能是品牌或者材质id
        private int id;//如果是修改的话，传回显数据的id，不是修改就不传
        private int number;//数量
        private int projectId;//不用管

        @HttpIgnore
        private String material;
        @HttpIgnore
        private String model;
        @HttpIgnore
        private String picturePath;
        @HttpIgnore
        private String specification;
        @HttpIgnore
        private String brand;

        public String getBrand() {
            return brand;
        }

        public void setBrand(String brand) {
            this.brand = brand;
        }

        public String getMaterial() {
            return material;
        }

        public void setMaterial(String material) {
            this.material = material;
        }

        public String getModel() {
            return model;
        }

        public void setModel(String model) {
            this.model = model;
        }

        public String getPicturePath() {
            return picturePath;
        }

        public void setPicturePath(String picturePath) {
            this.picturePath = picturePath;
        }

        public String getSpecification() {
            return specification;
        }

        public void setSpecification(String specification) {
            this.specification = specification;
        }

        public int getConsumableId() {
            return consumableId;
        }

        public void setConsumableId(int consumableId) {
            this.consumableId = consumableId;
        }

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getNumber() {
            return number;
        }

        public void setNumber(int number) {
            this.number = number;
        }

        public int getProjectId() {
            return projectId;
        }

        public void setProjectId(int projectId) {
            this.projectId = projectId;
        }
    }
}
